<?php


namespace app\home\controller;


use app\common\controller\BaseController;
use app\home\model\Good as goodModel;
use think\App;

class Banner extends BaseController
{
    protected $model;

    public function __construct(App $app, goodModel $good)
    {
        parent::__construct($app);
        $this->model = $good;
    }

    /**
     * @return mixed
     * 列表
     */
    public function query()
    {
        $where = [];
        $where['deleted'] = 0;
        $field = 'id,image_url,create_time';
        $page = input('page/d', 1);
        $pageSize = input('page_size/d', 10);
        $order = ['sort' => 'desc'];
        return $this->model->getList($where, $field, $order, $page, $pageSize);
    }
}